<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/header.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
     <form action="${ctx}/user/login" method="post" onsubmit="return validate(this)">
	用户名：<input name="username" type="text"/><br> 
	<br></br>
	密&nbsp;码：<input name="password" type="password"/><br> 
	<br></br>
	<input type="submit" name="optype" value="登录"/>
     </form>
    ${msg}
  </body>
	<script type="text/javascript">
		function validate(myform){
		 	if(myform.username.value.length == 0){
	     		alert("用户名不能为空！");
				myform.username.focus();
	     		return false;
		 	}
		 	if(myform.password.value.length < 4){
	     		alert("密码长度不能小于4！");
				myform.password.focus();
	     		return false;
		 	}
			return true;
		}
	</script>
</html>
<%@ include file="/footer.htm"%>